﻿package problems.cigarettesmokers;

public class CigaretteSmokerWithDeadlock extends AbstractCigaretteSmokerSolution
{
	@Override
    public void pushTobacco()
    {
    }

	@Override
    public void pushPaper()
    {
    }

	@Override
    public void pushMatch()
    {
    }

	@Override
    public void consumeResourcesAsSmokerWithMatch()
    {
        getCreatedPaper().waitOne();
        getCreatedTobacco().waitOne();
        getAgentSemaphore().release();
    }

	@Override
    public void consumeResourcesAsSmokerWithTobacco()
    {
        getCreatedPaper().waitOne();
        getCreatedMatch().waitOne();
        getAgentSemaphore().release();
    }

	@Override
    public void consumeResourcesAsSmokerWithPaper()
    {
        getCreatedMatch().waitOne();
        getCreatedTobacco().waitOne();
        getAgentSemaphore().release();
    }
}